import type * as T from './type'
import http from '@/utils/http'
export * from '@/apis/system/index'
const BASE_URL = '/system/provinceCityArea'

/** @desc 查询部门列表 */
export function listAddress(query: T.AddressQuery) {
  return http.get<T.AddressDto[]>(`${BASE_URL}/list`, query)
}

/** @desc 查询部门详情 */
export function getAddress(data:any) {
  return http.get<T.AddressDto>(`${BASE_URL}/get_data`,data)
}

/** @desc 新增部门 */
export function addAddress(data: any) {
  return http.post<boolean>(`${BASE_URL}/create`, data)
}

/** @desc 修改部门 */
export function updateAddress(data: any) {
  return http.post(`${BASE_URL}/modify`, data)
}

/** @desc 删除部门 */
export function deleteAddress(id: string) {
  return http.del(`${BASE_URL}/delete/${id}`)
}

/** @desc 导出部门 */
export function exportAddress(query: T.AddressQuery) {
  return http.download(`${BASE_URL}/export`, query)
}
